<?php


namespace app\controller;


use app\tools\ResponseTool;
use think\facade\Log;
use think\facade\Request;

class Car extends MyBaseController
{
    public function carinfo()
    {
        $list = \app\model\Car::select();
//        return json($list);
        return ResponseTool::getRs('OK', $list->toArray(), '');
    }

    public function modifyInfo ()
    {
        $select = \app\model\Car::where('id', Request::param('id'))->findOrEmpty();
        $select->save(Request::param('data'));
        return ResponseTool::getRs('OK', [], '修改成功');
    }
}